import request from '@/utils/request'

export function get(pcode) {
  const params = {
    pcode: pcode,
    pageNo: 0,
    pageSize: 9999
  }
  return request({
    url: 'admin/dict/list',
    method: 'get',
    params
  })
}

export function add(data) {
  return request({
    url: 'admin/dict/save',
    method: 'post',
    data
  })
}

export function del(ids) {
  return request({
    url: 'admin/dict/del',
    method: 'post',
    data: ids
  })
}

export function edit(data) {
  return request({
    url: 'admin/dict/save',
    method: 'post',
    data
  })
}

export default {add, edit, del,get }
